<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>局部组件</title>
</head>
<body>
<div id="app">
    <cpn></cpn>
</div>

<script !src="" type="module">
    import {createApp, defineComponent} from "../../../../js/vue.esm-browser.js";

    // 定义一个组件
    let component = defineComponent({
        template: "<h1>Hello, World!</h1>"
    });


    let app = createApp({
        setup() {
            return {}
        },
        components:{
            "cpn": component
        }
    })

    app.mount("#app")
</script>
</body>
</html>